<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script type="text/javascript">
$(function() {
	var addresses = $("td[id=addressTd]");
	for(var i = 0; i < addresses.length; i++) {
		var address = $(addresses[i]).html();
		address = address.substring(0,18) + "..";
		$(addresses[i]).html(address);
	}
});
</script>

</head>
<body>

<c:if test="${fn:length( userList ) > 0 }">
<table id="userDetailT" width="100%" align="center" border="1" bordercolor="#eeeeee" cellspacing="0" cellpadding="5" style="text-align:center;">
    <tr class="table_title">
        <td>가입일</td>
        <td>이름</td>
        <td>ID</td>
        <td>기종</td>
        <td>H.P</td>
        <td>주소</td>
        <td>E-mail</td>
        <td>꽁</td>
        <td>꽁돈</td>
        <td>비고</td>
    </tr>
    <c:forEach var="list" items="${userList }">
        <tr>
            <td>${fn:substring(list.regdate, 0, 10) }</td>
            <td>${list.name }</td>
            <td>
            	<a style="color:#2266dd;" onclick="window.open('userSearch_detailPopup.ga?id=${list.id}', 'user', 'width=1000,height=900')">${list.id }</a>
            </td>
            <td>${list.pname }</td>
            <td>${list.pnum }</td>
            <td id="addressTd">${list.address_1 } ${list.address_2 } ${list.zip }</td>
            <td>${list.email }</td>
            <td>${list.ggong }</td>
            <td>${list.ggongdon }</td>
            <td>
            	<c:if test="${list.status == 'idle' }">정상</c:if>
            	<c:if test="${list.status == 'out' }">탈퇴</c:if>
            </td>
        </tr>
    </c:forEach>
</table>
</c:if>
<c:if test="${fn:length( userList ) <= 0 }">
<table align="center">
    <tr>
        <td align="center">검색 결과가 없습니다.</td>
    </tr>
</table>
</c:if>


</body>
</html>